package com.xr.core.system.common.utils;

import cn.dev33.satoken.stp.StpUtil;

public class CurrentLoginUserUtil {

    /**
     * 获取当前登录用户id
     *
     * @return
     */
    public static Long getUserId() {
        try {
            return StpUtil.getLoginIdAsLong();
        } catch (Exception e) {
            return 0L;
        }
    }

}
